Skip to content

docs(azuread-group): update docs and added examples#887

Closed
pablosanchezpaz wants to merge 13 commits intomainfrom
add/azuread-group-docs
Closed

docs(azuread-group): update docs and added examples#887
pablosanchezpaz wants to merge 13 commits intomainfrom
add/azuread-group-docs

Conversation

@pablosanchezpaz
Copy link
Copy Markdown
Contributor

No description provided.

@pablosanchezpaz pablosanchezpaz requested a review from a team as a code owner February 6, 2026 08:23
@jotasixto jotasixto changed the title Add/azuread group docs docs(azuread-group): update docs and added examples Feb 6, 2026
@jotasixto jotasixto requested a review from Copilot February 6, 2026 18:34
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates documentation for the modules/azuread-group Terraform module and introduces terraform-docs configuration to generate richer README content (header/footer + generated inputs/outputs).

Changes:

  • Added docs/header.md and docs/footer.md to serve as terraform-docs header/footer content.
  • Added .terraform-docs.yml to inject generated docs into README.md.
  • Updated README.md with an injected terraform-docs block containing module overview, examples, and generated tables.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.

File Description
modules/azuread-group/docs/header.md New module header documentation + minimal YAML usage + known issues.
modules/azuread-group/docs/footer.md New footer with examples/resources/support links.
modules/azuread-group/README.md Adds terraform-docs injected block (currently appended, duplicating existing docs).
modules/azuread-group/.terraform-docs.yml Configures terraform-docs injection using the new header/footer files.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread modules/azuread-group/README.md Outdated
Comment on lines +151 to +155
## Requirements
- Terraform >= 1.7.0
- Provider azuread ~> 2.52.0
- Provider azurerm = 4.16.0

Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The header content adds a ## Requirements section (bullet list) and terraform-docs also generates a ## Requirements section (table) later in the same injected block, which results in duplicate headings and conflicting-looking requirement info. Consider removing the Requirements block from docs/header.md (or hiding the auto-generated Requirements section in .terraform-docs.yml) so requirements are documented only once.

Copilot uses AI. Check for mistakes.
Comment thread modules/azuread-group/README.md Outdated

For detailed examples, refer to the [module examples](https://github.com/prefapp/tfm/tree/main/modules/azuread-group/_examples):

- [basic](https://github.com/prefapp/tfm/tree/main/modules/azuread-group/_examples) - Example showing group creation, members and PIM configuration.
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The README Examples section lists a basic example but links to the _examples root and the module only contains _examples/with_yaml_file. This link should be updated (likely via docs/footer.md) so the README points to real example directories.

Suggested change
- [basic](https://github.com/prefapp/tfm/tree/main/modules/azuread-group/_examples) - Example showing group creation, members and PIM configuration.
- [basic](https://github.com/prefapp/tfm/tree/main/modules/azuread-group/_examples/with_yaml_file) - Example showing group creation, members and PIM configuration.

Copilot uses AI. Check for mistakes.
Comment on lines +87 to +107
**values.yaml**
```yaml
name: example-group-1
description: Minimal test group
members:
- type: user
email: user-2@example.com
```

**main.tf**
```hcl
locals {
values = yamldecode(file("./values.yaml"))
}

module "azuread-group" {
source = "../.."
name = local.values.name
description = local.values.description
members = local.values.members
}
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The “Minimal usage example” is missing required module inputs. In variables.tf, both directory_roles and subscription_roles have no defaults, so omitting them will cause Terraform to fail. Update the YAML and module invocation to provide these (e.g., empty lists for a true minimal example, or a small realistic role sample).

Copilot uses AI. Check for mistakes.
Comment thread modules/azuread-group/docs/header.md Outdated
}
```

> For a complete working example, see the `_examples/with_yaml_file` folder in this repository.
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This note says _examples/with_yaml_file is a “complete working example”, but that example currently pins azurerm to ~>3.100.0 while this module requires azurerm = 4.16.0 (provider constraint conflict). Either update the example to use a compatible provider constraint or adjust the wording so it doesn’t claim it’s working as-is.

Suggested change
> For a complete working example, see the `_examples/with_yaml_file` folder in this repository.
> For a more complete example configuration, see the `_examples/with_yaml_file` folder in this repository. Ensure that provider versions in the example align with the Requirements section above.

Copilot uses AI. Check for mistakes.
Comment thread modules/azuread-group/docs/footer.md Outdated

For detailed examples, refer to the [module examples](https://github.com/prefapp/tfm/tree/main/modules/azuread-group/_examples):

- [basic](https://github.com/prefapp/tfm/tree/main/modules/azuread-group/_examples) - Example showing group creation, members and PIM configuration.
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Examples section lists a basic example, but the link points to the _examples root and there is no basic example directory in this module (only _examples/with_yaml_file). Update the link text and URL to match the actual example folder(s).

Suggested change
- [basic](https://github.com/prefapp/tfm/tree/main/modules/azuread-group/_examples) - Example showing group creation, members and PIM configuration.
- [with_yaml_file](https://github.com/prefapp/tfm/tree/main/modules/azuread-group/_examples/with_yaml_file) - Example showing group creation, members and PIM configuration.

Copilot uses AI. Check for mistakes.
Comment thread modules/azuread-group/README.md
@pablosanchezpaz
Copy link
Copy Markdown
Contributor Author

Related to #786

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment thread modules/azuread-group/docs/header.md Outdated
}
```

> For a more complete example configuration, see the `_examples/with_yaml_file` folder in this repository. Ensure that provider versions in the example align with the Requirements section above.
Comment thread modules/azuread-group/docs/footer.md Outdated

For detailed examples, refer to the [module examples](https://github.com/prefapp/tfm/tree/main/modules/azuread-group/_examples):

- [basic](https://github.com/prefapp/tfm/tree/main/modules/azuread-group/_examples/with_yaml_file) - Example showing group creation, members and PIM configuration.
Comment thread modules/azuread-group/README.md Outdated
Comment on lines +101 to +105
source = "../.."
name = local.values.name
description = local.values.description
members = local.values.members
directory_roles = local.values.directory_roles
Comment thread modules/azuread-group/README.md Outdated
}
```

> For a more complete example configuration, see the `_examples/with_yaml_file` folder in this repository. Ensure that provider versions in the example align with the Requirements section above.
Comment thread modules/azuread-group/README.md Outdated
### Known issues
For detailed examples, refer to the [module examples](https://github.com/prefapp/tfm/tree/main/modules/azuread-group/_examples):

- [basic](https://github.com/prefapp/tfm/tree/main/modules/azuread-group/_examples/with\_yaml\_file) - Example showing group creation, members and PIM configuration.
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread modules/azuread-group/docs/header.md Outdated
Comment on lines +1 to +7
# Azure AD Group Module

This Terraform module creates and manages Azure Active Directory (AD) groups, including role assignments, PIM (Privileged Identity Management), owners, and members. It supports configuration via YAML for easier management and reproducibility.


### Provisioner actor and permissions

Copy link

Copilot AI Apr 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

docs/header.md doesn’t follow the repository’s module documentation standard (see CONTRIBUTING.md “Header Documentation”). The header should include a bolded module title and the expected top-level sections (e.g., ## Overview, ## Key Features, ## Basic Usage) so terraform-docs generates consistent READMEs across modules.

Suggested change
# Azure AD Group Module
This Terraform module creates and manages Azure Active Directory (AD) groups, including role assignments, PIM (Privileged Identity Management), owners, and members. It supports configuration via YAML for easier management and reproducibility.
### Provisioner actor and permissions
**Azure AD Group Module**
## Overview
This Terraform module creates and manages Azure Active Directory (AD) groups, including role assignments, PIM (Privileged Identity Management), owners, and members. It supports configuration via YAML for easier management and reproducibility.
## Key Features
- Creates and manages Azure AD groups.
- Supports role assignments and PIM-related configuration.
- Manages group owners and members.
- Supports YAML-based configuration for easier management and reproducibility.
## Basic Usage
Use this module to define and manage Azure AD groups and their related access configuration. Refer to the generated README sections below for module inputs, outputs, and usage details.
## Provisioner Actor and Permissions

Copilot uses AI. Check for mistakes.
Comment thread modules/azuread-group/README.md Outdated
| Name | Description |
|------|-------------|
| <a name="output_group_id"></a> [group\_id](#output\_group\_id) | group id |
| <a name="output_group_id"></a> [group\_id](#output\_group\_id) | n/a |
Copy link

Copilot AI Apr 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The generated Outputs table shows group_id description as n/a, which happens because the output "group_id" in outputs.tf has no description. Add a description to the output so the generated README contains meaningful output documentation.

Suggested change
| <a name="output_group_id"></a> [group\_id](#output\_group\_id) | n/a |
| <a name="output_group_id"></a> [group\_id](#output\_group\_id) | The ID of the Azure AD group |

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@@ -0,0 +1,120 @@
**Azure AD Group Module**
Copy link

Copilot AI Apr 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The module title is formatted as bold text instead of an H1 heading. Other module docs use an H1 (e.g., modules/azure-aks/docs/header.md:1, modules/github-team/docs/header.md:1), which improves readability and consistent TOC/anchor behavior. Consider changing this first line to an H1 and regenerating the README via terraform-docs so the rendered title is consistent across modules.

Suggested change
**Azure AD Group Module**
# Azure AD Group Module

Copilot uses AI. Check for mistakes.
@@ -1,22 +1,31 @@
## Requirements
<!-- BEGIN_TF_DOCS -->
**Azure AD Group Module**
Copy link

Copilot AI Apr 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The README starts with a bolded title (**Azure AD Group Module**) instead of an H1 heading. In this repo, module READMEs generally start with an H1 (see modules/aws-amq-rabbit/README.md:2, modules/azure-aks/README.md:2). Consider switching to an H1 (and ideally sourcing it from docs/header.md via terraform-docs) to keep documentation structure consistent.

Suggested change
**Azure AD Group Module**
# Azure AD Group Module

Copilot uses AI. Check for mistakes.

- [with_yaml_file](https://github.com/prefapp/tfm/tree/main/modules/azuread-group/_examples/with_yaml_file) - Example showing group creation, members and PIM configuration.

## Resources
Copy link

Copilot AI Apr 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section title duplicates terraform-docs’ generated ## Resources section earlier in the README (the one listing Terraform resources/data sources). Having two ## Resources headings can be confusing and makes anchors ambiguous. Consider renaming this footer section to something like ## Remote resources (as used in other modules, e.g., modules/aws-amq-rabbit/docs/footer.md:9, modules/azure-aks/docs/footer.md:89).

Suggested change
## Resources
## Remote resources

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants